import request from '@/utils/request'
/**
 * 套餐接口
 */
// 套餐列表
export const getSetmeal = (params) => {
  return request.get('/setmeal/page', {
    params: params
  })
}

// 起售、停售
export const changeStatus = (id, status) => {
  return request({
    url: '/setmeal/status/' + status,
    method: 'post',
    params: {
      id
    }
  })
}

// 批量删除
export const deleteSetmeal = (ids) => {
  return request({
    url: '/setmeal',
    method: 'delete',
    params: {
      ids
    }
  })
}

// 添加套餐
export const addSetmeal = (data) => {
  return request({
    url: '/setmeal',
    method: 'post',
    data: data
  })
}

// 查询套餐详情
export const getSetmealDetail = (id) => {
  return request.get('/setmeal/' + id)
}

// 修改套餐
export const editSetmeal = (data) => {
  return request({
    url: '/setmeal',
    method: 'put',
    data: data
  })
}
